export default [
    {title: '科室名称', dataIndex: "depName"},
    {title: '方向', dataIndex: "b"},
    {title: '病例数', dataIndex: "disCount"},
    {title: '科室结余', dataIndex: "disFee", customRender: disFeeFormatter,width:130},
    {title: '次均费用', dataIndex: "timeFeeAvg",width:90},
    {title: '次均费用趋势', dataIndex: "e"},
    {
        title: '次均药品费', align: "left", children: [
            {title: "费用", dataIndex: 'drugFeeAvg',width:90},
            {title: "趋势", dataIndex: 'f2'},
            {title: "占比", dataIndex: 'drugPercent', customRender: proportionFormatter}
        ]
    },
    {
        title: '次均材料费', align: "left", children: [
            {title: "费用", dataIndex: 'materialFeeAvg'},
            {title: "趋势", dataIndex: 'h2'},
            {title: "占比", dataIndex: 'materialPercent', customRender: proportionFormatter}
        ]
    },
    {
        title: '次均治疗费', align: "left", children: [
            {title: "费用", dataIndex: 'treatmentFeeAvg'},
            {title: "趋势", dataIndex: 'i2'},
            {title: "占比", dataIndex: 'treatmentPercent', customRender: proportionFormatter}
        ]
    },
    {
        title: '次均麻醉费', align: "left", children: [
            {title: "费用", dataIndex: 'anesthesiaFeeAvg'},
            {title: "趋势", dataIndex: 'g2'},
            {title: "占比", dataIndex: 'anesthesiaPercent', customRender: proportionFormatter}
        ]
    },
    {title: "操作", scopedSlots: {customRender: 'operation'}}
]

function proportionFormatter(text) {
    return `${Number(text).toFixed(2)}%`;
}

function disFeeFormatter(text) {
    return `${Number(text)}`
}
